<template>
  <div>
    <div class="header">
    </div>
    <div class="body">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="关联菜单" name="relMenu">
          <v-onRelMenu :roleId.sync="roleId"></v-onRelMenu>
        </el-tab-pane>
        <el-tab-pane label="关联数据" name="relData">
          配置管理
        </el-tab-pane>
        <el-tab-pane label="关联操作" name="relOption">
          角色管理
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
// import api from '@/api'
import onRelMenu from './permission/onRelMenu.vue'

export default {
  name: 'sys-role-rel-permission',
  components: {
    'v-onRelMenu': onRelMenu
  },
  props: {
    id: {
      type: Number
    }
  },
  data () {
    return {
      activeName: 'relMenu',
      roleId: null
    }
  },
  mounted () {
    // console.log(this.id, 'ggg')
    this.roleId = this.id
  },
  methods: {
    handleClick () {
    }
  },
  watch: {
    id (val) {
      this.roleId = val
    }
  }
}
</script>
